-- GENERATED SPELL FOR [Dragonflayer Death Weaver] --


function spell0_23658(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(43417,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_23658', 5000, 1)
end

function spell1_23658(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23658', 3000, 1)
end

function Sorts_23658(pUnit, Event)
local choix_sorts_23658 = math.random(0, 1)
if choix_sorts_23658 == 0 then
pUnit:RegisterEvent('spell0_23658', 1, 1)
end
if choix_sorts_23658 == 1 then
pUnit:RegisterEvent('spell1_23658', 1, 1)
end
end

function mob23658_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23658', math.random(1500, 3000), 1)
end

function mob23658_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23658_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23658_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23658, 1, 'mob23658_Action')
RegisterUnitEvent(23658, 2, 'mob23658_Leave')
RegisterUnitEvent(23658, 3, 'mob23658_Kill')
RegisterUnitEvent(23658, 4, 'mob23658_Die')
